//
//  ViewController.m
//  anqing
//
//  Created by 吴鸿 on 2017/1/11.
//  Copyright © 2017年 吴鸿. All rights reserved.
//

#import "ViewController.h"
#import "ZYNetworking.h"
#import <YYModel.h>

@interface ViewController ()
@property(nonatomic,strong)NSMutableArray<ZYAFNModel *> *dataArray;
@end

@implementation ViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    
    [[ZYNetworking sharedNetworkTool] request:ZYHttpMethodGet componentUrlString:@"https://git.oschina.net/whong7/anqing/raw/master/anqing2b.json?dir=0&filepath=anqing2b.json&oid=5aac32906795f17c321d37384026da0486df1d3e&sha=554886dd4f1068cc90848b5fa58f55e1636e818c" parameters:nil completion:^(id response, NSError *error) {
        
        self.dataArray = [NSMutableArray arrayWithArray: [NSArray yy_modelArrayWithClass:NSClassFromString(@"ZYAFNModel") json:response]];
        NSLog(@"%@",self.dataArray);
    }];
   
    
}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    NSLog(@"\nnsarray---------:%@",self.dataArray[0]);
    NSArray *array = self.dataArray.copy;
    self.dataArray[0].anqing = @"2b2b2b22b";
    NSLog(@"\nnsarray---------:%@",array[0]);
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
